﻿
namespace WindowsAPI.Windows
{
    public static partial class API
    {
        ///// <summary>Сообщения Windows</summary>
        //public static class Messages
        //{
        //    /// <summary>Отправка сообщения окну</summary>
        //    /// <param name="hWnd">Дескриптор окна</param>
        //    /// <param name="Msg">Сообщение</param>
        //    /// <param name="wParam">Старший параметр</param>
        //    /// <param name="lParam">Младший параметр</param>
        //    /// <returns></returns>
        //    [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)]
        //    public static extern IntPtr SendMessage(IntPtr hWnd, WM Msg,
        //        IntPtr wParam, IntPtr lParam);

        //    //If you want to prevent an (unreferenced) managed object from possibly being garbage collected 
        //    //during a call to SendMessage, you can wrap the handle in a HandleRef structure.
        //    [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)]
        //    public static extern IntPtr SendMessage(HandleRef hWnd, WM Msg,
        //        IntPtr wParam, IntPtr lParam);

        //    //If you use '[Out] StringBuilder', initialize the string builder with proper length first.
        //    [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)]
        //    public static extern IntPtr SendMessage(IntPtr hWnd, WM Msg,
        //        IntPtr wParam, StringBuilder lParam);

        //    [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)]
        //    public static extern IntPtr SendMessage(HandleRef hWnd, WM Msg,
        //        IntPtr wParam, StringBuilder lParam);

        //    [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)]
        //    public static extern IntPtr SendMessage(IntPtr hWnd, WM Msg,
        //        IntPtr wParam, [MarshalAs(UnmanagedType.LPStr)] String lParam);

        //    [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)]
        //    public static extern IntPtr SendMessage(HandleRef hWnd, WM Msg,
        //        IntPtr wParam, [MarshalAs(UnmanagedType.LPStr)] String lParam);

        //    [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)]
        //    public static extern IntPtr SendMessageW(IntPtr hWnd, WM Msg,
        //        IntPtr wParam, [MarshalAs(UnmanagedType.LPWStr)] string lParam);

        //    [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)]
        //    public static extern IntPtr SendMessageW(HandleRef hWnd, WM Msg,
        //        IntPtr wParam, [MarshalAs(UnmanagedType.LPWStr)] string lParam);

        //    [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)]
        //    public static extern void SendMessage(IntPtr hWnd, WM Msg,
        //        IntPtr wParam, ref WindowsAPI.RECT lParam);

        //    [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)]
        //    public static extern void SendMessage(HandleRef hWnd, WM Msg,
        //        IntPtr wParam, ref WindowsAPI.RECT lParam);

        //    [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)]
        //    public static extern IntPtr SendMessage(IntPtr hWnd, WM Msg,
        //        IntPtr wParam, ref WindowsAPI.POINT lParam);

        //    [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)]
        //    public static extern IntPtr SendMessage(HandleRef hWnd, WM Msg,
        //        IntPtr wParam, ref WindowsAPI.POINT lParam);

        //    #region PostMessage

        //    [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
        //    public static extern IntPtr PostMessage(IntPtr hWnd, WM Msg,
        //        IntPtr wParam, IntPtr lParam);

        //    [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
        //    public static extern IntPtr PostMessage(HandleRef hWnd, WM Msg,
        //        IntPtr wParam, IntPtr lParam);

        //    [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
        //    public static extern IntPtr PostMessage(IntPtr hWnd, WM Msg,
        //        IntPtr wParam, StringBuilder lParam);

        //    [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
        //    public static extern IntPtr PostMessage(HandleRef hWnd, WM Msg,
        //        IntPtr wParam, StringBuilder lParam);

        //    [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
        //    public static extern IntPtr PostMessage(IntPtr hWnd, WM Msg,
        //        IntPtr wParam, [MarshalAs(UnmanagedType.LPWStr)] string lParam);

        //    [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
        //    public static extern IntPtr PostMessage(HandleRef hWnd, WM Msg,
        //        IntPtr wParam, [MarshalAs(UnmanagedType.LPWStr)] string lParam);

        //    [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
        //    public static extern IntPtr PostMessage(IntPtr hWnd, WM Msg,
        //        IntPtr wParam, WindowsAPI.RECT lParam);

        //    [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
        //    public static extern IntPtr PostMessage(HandleRef hWnd, WM Msg,
        //        IntPtr wParam, WindowsAPI.RECT lParam);

        //    [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
        //    public static extern IntPtr PostMessage(IntPtr hWnd, WM Msg,
        //        IntPtr wParam, WindowsAPI.POINT lParam);

        //    [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
        //    public static extern IntPtr PostMessage(HandleRef hWnd, WM Msg,
        //        IntPtr wParam, WindowsAPI.POINT lParam);

        //    #endregion
        //}
    }
}
